add_subdirectory(pserver-lite)

add_executable(agregator
  agregator.cc
)

target_link_libraries(agregator
  PRIVATE
    Szarp2
    ${OPENSSL_LIBRARIES}
)

add_executable(crypt
  crypt.c
)

target_link_libraries(crypt
  PRIVATE
    Szarp2
    ${CRYPT_LIBRARIES}
)

add_executable(lpparse
  lpparse.cc
)

target_link_libraries(lpparse
  PRIVATE
    Szarp2
)

add_executable(precconv
  precconv.cc
)

target_link_libraries(precconv
  PRIVATE
    Szarp2
)

add_executable(sproxy
  sproxy.c
)

target_link_libraries(sproxy
  PRIVATE
    Szarp2
)

add_executable(vrsh
  vrsh.c
)

target_link_libraries(vrsh
  PRIVATE
    Szarp2
)

add_executable(vrsh_d
  vrsh.c
)

target_link_libraries(vrsh_d
  PRIVATE
    Szarp2
)

add_executable(stampd
  stampd.c
)

target_link_libraries(stampd
  PRIVATE
    Szarp2
)

add_executable(ipk2szarp
  ipk2szarp.cc
)

target_link_libraries(ipk2szarp
  PRIVATE
    Szarp2
)

install(TARGETS
  agregator lpparse precconv vrsh vrsh_d stampd ipk2szarp
  RUNTIME DESTINATION "${INSTALL_BINDIR}" DESTINATION bin)

install( PROGRAMS conf-get.sh conf-import.py conf-put.sh szrsync szbpush i2smo ipcclean raporter.py DESTINATION "${INSTALL_BINDIR}" )

add_subdirectory(remarks_server)
add_subdirectory(probes_server)
add_subdirectory(monitoring)
